// harness.c: Test the HPACK Huffman decompressor.
// Written 5/30/14 by David Krauss. No rights reserved.

#include <stdint.h>
#include <stdio.h>

#include "bitstream.h"
#include "decode.h"

int main() {
	uint8_t const data[] = "\xe7\xcf\x9b\xeb\xe8\x9b\x6f\xb1\x6f\xa9\xb6\xff";
	
	struct hpack_huffman_bit_source src = { data, data + sizeof data - 1 };
	
	uint8_t str[ 18 ] = { 0 }, * pen = str;
	
	int result = hpack_huffman_decode( & src, & pen, sizeof str - 1 );
	
	printf( "%d\n%s\n", result, str );
}
